#include <QtGui/QApplication>
//#include <QtDeclarative/QDeclarativeView>
#include <QDebug>
#include "homeview.h"
#include <qdesktopwidget.h>

int main(int argc, char *argv[])
{
    qDebug() << "arg " << argc;
    QApplication a(argc, argv);
    //MyDialog d ;
    HomeView d ;
    QStringList argCmnd = a.arguments();
    d.show();
    if(argCmnd.length()==2){
        QString sFile = "/home/emmanuel/CatHome/qml/" + argCmnd.at(1);
        //devra être de la forme: /home/emmanuel/CatHome/qml/home/main.qml
        qDebug() << "file to load " << sFile;
        d.loadNewQml(sFile);
    }



    return a.exec();
}
